package root;

import View.Fenetre;
import Controller.Curseur;
import Model.Ville;
import View.FenetreFinPartie;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Timer;

public class Maadjo {
	private Ville ville;
	//private Board board;
	private Curseur curseur;
	private Fenetre fenetre;

	public Maadjo() {
		MapObjects.init();

		//init du modele
		ville = new Ville(this);
                
		//init de la vue
		fenetre = new Fenetre(ville);
                
		//init du controler
		curseur = new Curseur(ville, fenetre);
		new Timer(500, taskPerformer).start();
	}

	

         ActionListener taskPerformer = new ActionListener() {

         @Override
         public void actionPerformed(ActionEvent evt) {
             fenetre.repaint();
         }
     };
         public void FinPartie(String message){
             new FenetreFinPartie(message);
         }

}
